package com.xiaoke.service;

import com.xiaoke.entity.User;
import com.xiaoke.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
public interface UserService {

    @GetMapping("/user/findByToken")
    User findByToken(@RequestParam("token") String token);

    @PostMapping("/user/findByParams")
    List<User> findByParams(@RequestBody Map<String, Object> map);

    @PostMapping("/user/update")
    void update(@RequestBody User user);

    @PostMapping("/user/insert")
    void insert(@RequestBody User user);

}
